package com.gong.DesignPattern.MediatorPattern;

/**
 * @author GongChang
 * @version 1.0
 * @date 2021/6/30 0030 9:25
 */
public class User {

    private String name;
    private static ChatRoom chatRoom = new ChatRoom();

    public User(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void sendMessage(String msg){
        chatRoom.showMessage(this,msg);
    }
}
